package com.zhengtoon.mctoon.conv.dao.sdzc;

import org.apache.ibatis.annotations.Param;

import com.zhengtoon.mctoon.conv.bean.sdzc.Reply;

import java.util.List;

/**
 * 信件回复DAO接口
 *
 * @author 刘振华
 * @since 2017-04-12
 * Copyright: Copyright (c) 2017
 * Company:北京政务通有限公司
 */
public interface ReplyMapper {


    /**
     * 根据官方回复id获取回复详情
     *
     * @param ghlReplyId, ghlSysLetterId, ghlTransferLetterId, ghlReplyType, ghlReplyTitle, ghlReplyContent, ghlReplyOrgName, ghlReplyUser, ghlReplyDate, ghlOpenFlag, createTime, updateTime
     * @return Reply
     */
    Reply selectSingle(String ghlReplyId, String ghlSysLetterId, String ghlTransferLetterId, String ghlReplyType, String ghlReplyTitle, String ghlReplyContent, String ghlReplyOrgName, String ghlReplyUser, String ghlReplyDate, String ghlOpenFlag, String createTime, String updateTime);

    /**
     * 获取最新回复
     *
     * @param ghlSysLetterId
     * @return
     */
    Reply queryNewestReplyBySysLetterId(@Param("sysLetterId") String ghlSysLetterId);

    /**
     * 根据子信件获取回复列表
     *
     * @param transferLetterId
     * @return
     */
    List<Reply> queryReplyById(String transferLetterId);

    /**
     * 查询replyId count	144637
     *
     * @param replyId
     * @return
     */
    Integer queryReplyIdCount(@Param("replyId") String replyId);

    /**
     * 插入回复 144637
     *
     * @param reply
     * @return
     */
    Integer insertReply(Reply reply);

    /**
     * 根据内部信件id查询回复列表   144637
     *
     * @param sysLetterId
     * @return
     */
    List<Reply> queryReplyBySysletterId(String sysLetterId);
}